﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:themes="clr-namespace:CmdletHelpEditor.Themes">
	<ControlTemplate x:Key="ScrollViewerControlTemplate1" TargetType="{x:Type ScrollViewer}">
		<Grid x:Name="Grid" Background="{TemplateBinding Background}">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"/>
				<ColumnDefinition Width="Auto"/>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="*"/>
				<RowDefinition Height="Auto"/>
			</Grid.RowDefinitions>
			<Rectangle x:Name="Corner" Grid.Column="1" Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Grid.Row="1"/>
			<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
			<ScrollBar x:Name="PART_VerticalScrollBar" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
			<ScrollBar x:Name="PART_HorizontalScrollBar" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
		</Grid>
	</ControlTemplate>
	<Style TargetType="{x:Type ScrollBar}">
		<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
		<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
		<Setter Property="Background">
			<Setter.Value>
				<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
					<GradientStop Color="#FFEEEDE5" Offset="0"/>
					<GradientStop Color="#FFEEEDE5" Offset="0.05"/>
					<GradientStop Color="#FFF3F1EC" Offset="0.06"/>
					<GradientStop Color="#FFFEFEFE" Offset="0.94"/>
					<GradientStop Color="#FFEEEDE5" Offset="0.95"/>
					<GradientStop Color="#FFEEEDE5" Offset="1"/>
				</LinearGradientBrush>
			</Setter.Value>
		</Setter>
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="Width" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
		<Setter Property="MinWidth" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ScrollBar}">
					<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
						<Grid.RowDefinitions>
							<RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
							<RowDefinition Height="1E-05*"/>
							<RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
						</Grid.RowDefinitions>
						<RepeatButton Command="ScrollBar.LineUpCommand" themes:ScrollChrome.ScrollGlyph="UpArrow" Height="17" VerticalAlignment="Bottom">
							<RepeatButton.Style>
								<Style TargetType="{x:Type RepeatButton}">
									<Setter Property="OverridesDefaultStyle" Value="True"/>
									<Setter Property="Focusable" Value="False"/>
									<Setter Property="IsTabStop" Value="False"/>
									<Setter Property="Template">
										<Setter.Value>
											<ControlTemplate TargetType="{x:Type RepeatButton}">
												<themes:ScrollChrome x:Name="Chrome" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" SnapsToDevicePixels="True" ScrollGlyph="{TemplateBinding themes:ScrollChrome.ScrollGlyph}"/>
											</ControlTemplate>
										</Setter.Value>
									</Setter>
								</Style>
							</RepeatButton.Style>
						</RepeatButton>
						<Track x:Name="PART_Track" IsDirectionReversed="True" Grid.Row="1">
							<Track.DecreaseRepeatButton>
								<RepeatButton Command="ScrollBar.PageUpCommand">
									<RepeatButton.Style>
										<Style TargetType="{x:Type RepeatButton}">
											<Setter Property="OverridesDefaultStyle" Value="True"/>
											<Setter Property="Background" Value="Transparent"/>
											<Setter Property="Focusable" Value="False"/>
											<Setter Property="IsTabStop" Value="False"/>
											<Setter Property="Template">
												<Setter.Value>
													<ControlTemplate TargetType="{x:Type RepeatButton}">
														<Rectangle x:Name="Bg" Fill="{TemplateBinding Background}"/>
														<ControlTemplate.Triggers>
															<Trigger Property="IsPressed" Value="True">
																<Setter Property="Fill" TargetName="Bg">
																	<Setter.Value>
																		<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
																			<GradientStop Color="#FFD7D5C2" Offset="0"/>
																			<GradientStop Color="#FFD7D5C2" Offset="0.05"/>
																			<GradientStop Color="#FFE3DED3" Offset="0.06"/>
																			<GradientStop Color="#FFFDFDF6" Offset="0.94"/>
																			<GradientStop Color="#FFD7D5C2" Offset="0.95"/>
																			<GradientStop Color="#FFD7D5C2" Offset="1"/>
																		</LinearGradientBrush>
																	</Setter.Value>
																</Setter>
															</Trigger>
														</ControlTemplate.Triggers>
													</ControlTemplate>
												</Setter.Value>
											</Setter>
										</Style>
									</RepeatButton.Style>
								</RepeatButton>
							</Track.DecreaseRepeatButton>
							<Track.IncreaseRepeatButton>
								<RepeatButton Command="ScrollBar.PageDownCommand">
									<RepeatButton.Style>
										<Style TargetType="{x:Type RepeatButton}">
											<Setter Property="OverridesDefaultStyle" Value="True"/>
											<Setter Property="Background" Value="Transparent"/>
											<Setter Property="Focusable" Value="False"/>
											<Setter Property="IsTabStop" Value="False"/>
											<Setter Property="Template">
												<Setter.Value>
													<ControlTemplate TargetType="{x:Type RepeatButton}">
														<Rectangle x:Name="Bg" Fill="{TemplateBinding Background}"/>
														<ControlTemplate.Triggers>
															<Trigger Property="IsPressed" Value="True">
																<Setter Property="Fill" TargetName="Bg">
																	<Setter.Value>
																		<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
																			<GradientStop Color="#FFD7D5C2" Offset="0"/>
																			<GradientStop Color="#FFD7D5C2" Offset="0.05"/>
																			<GradientStop Color="#FFE3DED3" Offset="0.06"/>
																			<GradientStop Color="#FFFDFDF6" Offset="0.94"/>
																			<GradientStop Color="#FFD7D5C2" Offset="0.95"/>
																			<GradientStop Color="#FFD7D5C2" Offset="1"/>
																		</LinearGradientBrush>
																	</Setter.Value>
																</Setter>
															</Trigger>
														</ControlTemplate.Triggers>
													</ControlTemplate>
												</Setter.Value>
											</Setter>
										</Style>
									</RepeatButton.Style>
								</RepeatButton>
							</Track.IncreaseRepeatButton>
							<Track.Thumb>
								<Thumb themes:ScrollChrome.ScrollGlyph="VerticalGripper">
									<Thumb.Style>
										<Style TargetType="{x:Type Thumb}">
											<Setter Property="OverridesDefaultStyle" Value="True"/>
											<Setter Property="IsTabStop" Value="False"/>
											<Setter Property="Template">
												<Setter.Value>
													<ControlTemplate TargetType="{x:Type Thumb}">
														<themes:ScrollChrome x:Name="Chrome" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsDragging}" SnapsToDevicePixels="True" ScrollGlyph="{TemplateBinding themes:ScrollChrome.ScrollGlyph}"/>
													</ControlTemplate>
												</Setter.Value>
											</Setter>
										</Style>
									</Thumb.Style>
								</Thumb>
							</Track.Thumb>
						</Track>
						<RepeatButton Command="ScrollBar.LineDownCommand" Grid.Row="2" themes:ScrollChrome.ScrollGlyph="DownArrow">
							<RepeatButton.Style>
								<Style TargetType="{x:Type RepeatButton}">
									<Setter Property="OverridesDefaultStyle" Value="True"/>
									<Setter Property="Focusable" Value="False"/>
									<Setter Property="IsTabStop" Value="False"/>
									<Setter Property="Template">
										<Setter.Value>
											<ControlTemplate TargetType="{x:Type RepeatButton}">
												<themes:ScrollChrome x:Name="Chrome" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" SnapsToDevicePixels="True" ScrollGlyph="{TemplateBinding themes:ScrollChrome.ScrollGlyph}"/>
											</ControlTemplate>
										</Setter.Value>
									</Setter>
								</Style>
							</RepeatButton.Style>
						</RepeatButton>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Style.Triggers>
			<Trigger Property="Orientation" Value="Horizontal">
				<Setter Property="Width" Value="Auto"/>
				<Setter Property="MinWidth" Value="0"/>
				<Setter Property="Background">
					<Setter.Value>
						<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
							<GradientStop Color="#FFEEEDE5" Offset="0"/>
							<GradientStop Color="#FFEEEDE5" Offset="0.05"/>
							<GradientStop Color="#FFF3F1EC" Offset="0.06"/>
							<GradientStop Color="#FFFEFEFE" Offset="0.94"/>
							<GradientStop Color="#FFEEEDE5" Offset="0.95"/>
							<GradientStop Color="#FFEEEDE5" Offset="1"/>
						</LinearGradientBrush>
					</Setter.Value>
				</Setter>
				<Setter Property="Height" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
				<Setter Property="MinHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ScrollBar}">
							<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
								<Grid.ColumnDefinitions>
									<ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
									<ColumnDefinition Width="1E-05*"/>
									<ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
								</Grid.ColumnDefinitions>
								<RepeatButton Command="ScrollBar.LineLeftCommand" themes:ScrollChrome.ScrollGlyph="LeftArrow">
									<RepeatButton.Style>
										<Style TargetType="{x:Type RepeatButton}">
											<Setter Property="OverridesDefaultStyle" Value="True"/>
											<Setter Property="Focusable" Value="False"/>
											<Setter Property="IsTabStop" Value="False"/>
											<Setter Property="Template">
												<Setter.Value>
													<ControlTemplate TargetType="{x:Type RepeatButton}">
														<themes:ScrollChrome x:Name="Chrome" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" SnapsToDevicePixels="True" ScrollGlyph="{TemplateBinding themes:ScrollChrome.ScrollGlyph}"/>
													</ControlTemplate>
												</Setter.Value>
											</Setter>
										</Style>
									</RepeatButton.Style>
								</RepeatButton>
								<Track x:Name="PART_Track" Grid.Column="1">
									<Track.DecreaseRepeatButton>
										<RepeatButton Command="ScrollBar.PageLeftCommand">
											<RepeatButton.Style>
												<Style TargetType="{x:Type RepeatButton}">
													<Setter Property="OverridesDefaultStyle" Value="True"/>
													<Setter Property="Background" Value="Transparent"/>
													<Setter Property="Focusable" Value="False"/>
													<Setter Property="IsTabStop" Value="False"/>
													<Setter Property="Template">
														<Setter.Value>
															<ControlTemplate TargetType="{x:Type RepeatButton}">
																<Rectangle x:Name="Bg" Fill="{TemplateBinding Background}"/>
																<ControlTemplate.Triggers>
																	<Trigger Property="IsPressed" Value="True">
																		<Setter Property="Fill" TargetName="Bg">
																			<Setter.Value>
																				<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
																					<GradientStop Color="#FFD7D5C2" Offset="0"/>
																					<GradientStop Color="#FFD7D5C2" Offset="0.05"/>
																					<GradientStop Color="#FFE3DED3" Offset="0.06"/>
																					<GradientStop Color="#FFFDFDF6" Offset="0.94"/>
																					<GradientStop Color="#FFD7D5C2" Offset="0.95"/>
																					<GradientStop Color="#FFD7D5C2" Offset="1"/>
																				</LinearGradientBrush>
																			</Setter.Value>
																		</Setter>
																	</Trigger>
																</ControlTemplate.Triggers>
															</ControlTemplate>
														</Setter.Value>
													</Setter>
												</Style>
											</RepeatButton.Style>
										</RepeatButton>
									</Track.DecreaseRepeatButton>
									<Track.IncreaseRepeatButton>
										<RepeatButton Command="ScrollBar.PageRightCommand">
											<RepeatButton.Style>
												<Style TargetType="{x:Type RepeatButton}">
													<Setter Property="OverridesDefaultStyle" Value="True"/>
													<Setter Property="Background" Value="Transparent"/>
													<Setter Property="Focusable" Value="False"/>
													<Setter Property="IsTabStop" Value="False"/>
													<Setter Property="Template">
														<Setter.Value>
															<ControlTemplate TargetType="{x:Type RepeatButton}">
																<Rectangle x:Name="Bg" Fill="{TemplateBinding Background}"/>
																<ControlTemplate.Triggers>
																	<Trigger Property="IsPressed" Value="True">
																		<Setter Property="Fill" TargetName="Bg">
																			<Setter.Value>
																				<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
																					<GradientStop Color="#FFD7D5C2" Offset="0"/>
																					<GradientStop Color="#FFD7D5C2" Offset="0.05"/>
																					<GradientStop Color="#FFE3DED3" Offset="0.06"/>
																					<GradientStop Color="#FFFDFDF6" Offset="0.94"/>
																					<GradientStop Color="#FFD7D5C2" Offset="0.95"/>
																					<GradientStop Color="#FFD7D5C2" Offset="1"/>
																				</LinearGradientBrush>
																			</Setter.Value>
																		</Setter>
																	</Trigger>
																</ControlTemplate.Triggers>
															</ControlTemplate>
														</Setter.Value>
													</Setter>
												</Style>
											</RepeatButton.Style>
										</RepeatButton>
									</Track.IncreaseRepeatButton>
									<Track.Thumb>
										<Thumb themes:ScrollChrome.ScrollGlyph="HorizontalGripper">
											<Thumb.Style>
												<Style TargetType="{x:Type Thumb}">
													<Setter Property="OverridesDefaultStyle" Value="True"/>
													<Setter Property="IsTabStop" Value="False"/>
													<Setter Property="Template">
														<Setter.Value>
															<ControlTemplate TargetType="{x:Type Thumb}">
																<themes:ScrollChrome x:Name="Chrome" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsDragging}" SnapsToDevicePixels="True" ScrollGlyph="{TemplateBinding themes:ScrollChrome.ScrollGlyph}"/>
															</ControlTemplate>
														</Setter.Value>
													</Setter>
												</Style>
											</Thumb.Style>
										</Thumb>
									</Track.Thumb>
								</Track>
								<RepeatButton Grid.Column="2" Command="ScrollBar.LineRightCommand" themes:ScrollChrome.ScrollGlyph="RightArrow">
									<RepeatButton.Style>
										<Style TargetType="{x:Type RepeatButton}">
											<Setter Property="OverridesDefaultStyle" Value="True"/>
											<Setter Property="Focusable" Value="False"/>
											<Setter Property="IsTabStop" Value="False"/>
											<Setter Property="Template">
												<Setter.Value>
													<ControlTemplate TargetType="{x:Type RepeatButton}">
														<themes:ScrollChrome x:Name="Chrome" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" SnapsToDevicePixels="True" ScrollGlyph="{TemplateBinding themes:ScrollChrome.ScrollGlyph}"/>
													</ControlTemplate>
												</Setter.Value>
											</Setter>
										</Style>
									</RepeatButton.Style>
								</RepeatButton>
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Trigger>
		</Style.Triggers>
	</Style>
</ResourceDictionary>